package source;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;


public class Player extends HitableObject {

	public int grav = 0;
	public boolean grounded = false;

	public Player() {
		super(new float[] { 0, 0, 32, 0, 32, 64, 0, 64, 0, 0 });

		this.hitPolygon.setX(50);
		this.hitPolygon.setY(300-64-20);

		this.x = 50;
		this.y = 300-64-20;
		init();
	}



	private void init() {
		this.type = Type.PLAYER;
		this.depth = 5;
		try {
			image = new Image("res/assets/1.png");
		} catch (SlickException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		
				
	}
	
	@Override
	public void move(int X, int Y)
	{
		x += X;
		y += Y;
		this.hitPolygon.setX(x);		
		this.hitPolygon.setY(y);
	
	}
}
